package com.javathread.th2.forkjoin.sum;

import java.util.Random;

/**
 * 产生整型数组
 * @author Administrator
 *
 */
public class MakArray {
	//数组长度
	public static final int ARRAY_LENGTH = 100000000;
	
	public static long[] makeArray() {
		//new 一个随机数发生器
		Random r = new Random();
		long[] result = new long[ARRAY_LENGTH];
		for (int i = 0; i < ARRAY_LENGTH; i++) {
			//用随机数填充数组
			result[i] = r.nextInt(ARRAY_LENGTH*3);
		}
		return result;
	}
}
